package org.gdpu.model;

import javax.persistence.*;


/**
 * 考试成绩
 */
@Entity
public class Score {
    /**
     * 系统序号
     */
    private int id;
    /**
     * 考生
     */
    private Examiner examiner;

    /**
     * 题目
     */
    private TestPaper testPaper;
    /**
     * 答案（判断题可采用T或F ）
     */
    private String answer;
    /**
     * 该题得分
     */
    private float score;

    /**
     * 阅卷人
     */
    private String marker;

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @ManyToOne
    @JoinColumn(name = "examiner")
    public Examiner getExaminer() {
        return examiner;
    }

    public void setExaminer(Examiner examiner) {
        this.examiner = examiner;
    }

    @ManyToOne
    @JoinColumn(name = "testPaper")
    public TestPaper getTestPaper() {
        return testPaper;
    }

    public void setTestPaper(TestPaper testPaper) {
        this.testPaper = testPaper;
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    public String getMarker() {
        return marker;
    }

    public void setMarker(String marker) {
        this.marker = marker;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }
}
